package com.letoken.platform.repo.admin.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 后台用户角色表
 * </p>
 *
 * @author 作者
 * @since 2022-11-23
 */
@Getter
@Setter
@TableName("admin_role")
@ApiModel(value = "AdminRole对象", description = "后台用户角色表")
public class AdminRole extends Model<AdminRole> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "admin_role_id", type = IdType.AUTO)
    private Integer adminRoleId;

    @ApiModelProperty("名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("启用状态：0启用，-1禁用")
    @TableField("examine_status")
    private Integer examineStatus;

    @ApiModelProperty("上级角色Id，顶级为0")
    @TableField("pid")
    private Integer pid;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty("描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("是否删除 默认0不删除")
    @TableField("is_delete")
    private Boolean isDelete;


    @Override
    public Serializable pkVal() {
        return this.adminRoleId;
    }

}
